<?php

namespace App\Services\Goods;

use App\Models\SearchHistory;
use App\Services\BaseServices;

class SearchHistoryServices extends BaseServices
{
    public function save($userId,$keyword,$from): SearchHistory
    {
        $history = new SearchHistory();
        $history->fill(
            [
                'user_id' => $userId,
                'keyword' => $keyword,
                'from' => $from
            ]
        );
        $history->save();
        return $history;
    }
}
